<script lang="ts" setup>
import router from '@/router'

const platformName = '王保海快速开发平台'

/**
 * 根据路径跳转路由
 * @param path 路由路径
 */
function pathRoute(path: string) {
  router.push({ path })
}

function login() {
  // 跳转到登录页
  pathRoute('/OAuth2Redirect')
}
</script>

<template>
  <div class="home-container">
    <el-row>
      <el-col :span="24" class="content">
        <el-text>{{ platformName }}</el-text>
        <el-button type="primary" @click="login()">
          统一认证登录
        </el-button>
      </el-col>
    </el-row>
  </div>
</template>

<style scoped>
.home-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* 使容器高度占满整个视口高度 */
}

.content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.el-button {
  margin-left: 15px; /* 根据需要调整间距 */
}
</style>
